package cn.blbsz.shop.domain.p;

import org.springframework.data.repository.RepositoryDefinition;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import java.util.List;

/**
 * Created by yipingdong on 2017/4/18.
 */
@RepositoryDefinition(domainClass = AreaEntity.class, idClass = Integer.class)
@RepositoryRestResource(path = "area",collectionResourceRel = "areas",itemResourceRel = "area")
public interface AreaRepository{
    @RestResource(path = "parentId", rel = "parentId")
    List<AreaEntity> findByParentId(@Param("pid") Integer pid);
}
